/**
 *  Copyright 2010 ShenYang voole Co. Ltd.
 *  All right reserved. 
 */
package cn.piaoyi.service;

import java.util.List;

import cn.piaoyi.bean.Admin;
import cn.piaoyi.bean.Category;
import cn.piaoyi.exception.PiaoyiException;

/**
 * 功能描述:类别事务接口
 *
 * 创建日期 Apr 10, 2010
 *
 * @author zhangbaochao
 *
 * @version 1.0
 *
 */
public interface CategoryService {
	/**
	 * 保存Category对象
	 * 
	 * @param admin
	 * 			Category对象
	 * @return Category
	 * 			Category对象
	 */
	public Category createCategory(Category category) throws PiaoyiException;
	
	/**
	 * 根据code获取Category对象
	 * 
	 * @param code
	 * 			String
	 * @return Category
	 * 			Category对象
	 */
	public Category findCategoryByCode(String code);
	
	/**
	 * 更新Category对象
	 * 
	 * @param category
	 * 			Category对象
	 * @return Category
	 * 			Category对象
	 */
	public Category updateCategory(Category category) throws PiaoyiException;
	
	/**
	 * 根据主键ID获取Category对象
	 * 
	 * @param id
	 * 			主键ID
	 * @return Category
	 * 			Category对象
	 */
	public Category findCategoryById(long id);
	
	/**
	 * 获取Category列表
	 * 
	 * @param orderby
	 *            String
	 * @param ascOrDesc
	 *            int
	 * @return List
	 * 			Admin对象列表
	 */
	public List findCategorys(String orderby, int ascOrDesc);
	
	/**
	 * 删除Category对象
	 */
	public void removeCategoryById(long id);
}
